package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    void insertPermissionRelation(@Param("rid") Long rid, @Param("pid") Long pid);

    void insertPermissionRelationBatch(@Param("rid") Long rid, @Param("permissionIds") List<Long> permissionIds);

    void deletePermissionRelationByRId(Long rid);

    List<Role> queryRoleByEId(Long eid);

    void deleteEmployeeRelationByRId(Long rid);
}